---
import "@fontsource/inter";
import BaseHead from "@/components/layout/BaseHead.astro";
import PostHog from "@/components/Posthog.astro";
import { Toaster } from "sonner";
import { cn } from "@/lib/utils";

type Props = {
  title: string;
  description?: string;
  bodyClass?: string;
};

const { title, description, bodyClass } = Astro.props;
---

<!doctype html>
<html lang="en" class="scroll-smooth">
  <head>
    <BaseHead title={title} description={description} />
    <PostHog />
  </head>
  <body class={cn("flex flex-col min-h-screen", bodyClass)}>
    <slot />
    <Toaster richColors client:only="react" />
  </body>
</html>
